package com.example.demo.service;

import com.example.demo.model.User;
import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2023-12-06
 * Time: 20:04
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public int register(String identifyId,String password) {
        return userMapper.register(identifyId,password);
    }

    public User login(String identifyId,String password) {
        return userMapper.login(identifyId,password);
    }

    public User getUserByIdentifyId(String identifyId) {
        return userMapper.getUserByIdentifyId(identifyId);
    }
}
